import { createRouter, createWebHashHistory } from 'vue-router';
import LockPage from '../views/LockPage.vue';
import Home from '../views/Home.vue';

const routes = [
    { 
        path: '/',
        redirect: '/lock'
    },
    {
        path: '/lock',
        name: 'LockPage',
        component: LockPage
    },
    {
        path: '/home',
        name: 'Home',
        component: Home
    },
    {
        path: '/self-check',
        name: 'self-check',
        component: () => import('../views/SelfCheck.vue')
    },
    {
        path: '/knowledge',
        name: 'knowledge',
        component: () => import('../views/MeicineGraph.vue')
    },
    {
        path: '/medicine',
        name: 'MedicineSearch',
        component: import('../views/MedicineSearch.vue')
    },
    {
        path: '/case',
        name: 'CaseAnalysis',
        component: import('../views/CaseAnalysis.vue')
    },
    {
        path: '/hospital',
        name: 'HospitalFinder',
        component: import('../views/PlaceSearch.vue')
    },
    {
        path: '/test',
        name: 'TestNeo4jComponent',
        component: () => import('../components/Neo4jChart.vue')
    },
    {
        path: '/assistant',
        name: 'assistant',
        component: () => import('../views/Assistant.vue')
    },
    {
        path: '/selfCheckResult/:symptom',
        name: 'selfCheckResult',
        component: () => import('../views/SelfCheckResult.vue'),
        props: true
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router;